<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // let i = 1
        // while (i <= 5) {
        //     if (i === 3) {
        //         break       // 退出整个循环
        //     }
        //     console.log(`我要吃第${i}个包子`)
        //     i++
        // }

        let i = 1
        while (i <= 5) {
            if (i === 3) {
                i++
                continue       // 退出本次循环，继续下一轮循环
            }
            console.log(`我要吃第${i}个包子`)
            i++
        }
    </script>

</body>

</html>